#pragma once
#include "../Include/igsensor.h"

#include "smiAccelerometer.h"

class SamsungGSensor :
	public IGSensor
{
public:
	static SamsungGSensor* GetInstance();

private:
	static SamsungGSensor* samsungGSensor;
	SamsungGSensor(void);
	SamsungGSensor(const SamsungGSensor&);
	~SamsungGSensor(void);

	typedef UINT (WINAPI * PFN_SmiAccelerometerGetVector)(SmiAccelerometerVector*);
	typedef UINT (WINAPI * PFN_SmiAccelerometerGetCapabilities)(SmiAccelerometerCapabilities*);
	typedef UINT (WINAPI * PFN_SmiAccelerometerRegisterHandler)(UINT, SmiAccelerometerHandler);
	typedef UINT (WINAPI * PFN_SmiAccelerometerUnregisterHandler)();

	PFN_SmiAccelerometerGetVector pfnSmiAccelerometerGetVector;
	PFN_SmiAccelerometerGetCapabilities pfnSmiAccelerometerGetCapabilities;
	PFN_SmiAccelerometerRegisterHandler pfnSmiAccelerometerRegisterHandler;
	PFN_SmiAccelerometerUnregisterHandler pfnSmiAccelerometerUnregisterHandler;

public:
	GVector GetGVector() override;
	void Register() override;
	void Unregister() override;

	//void Process() override;
	

private:
	static void GetVectorHandler(SmiAccelerometerVector accel);
};
